<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10-箭头函数</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.1.4/jquery.js"></script>
</head>
<body>
    <script>
        //返回一个数字的函数
        function num(x){
            return x;
        }
        var n = num(100);
        console.log(n);

        /**
         * 语法结构 const 函数名 = (x)=>{}
         * () 函数
         * => 指向
         * {} 函数体
         */
        const num1 = (x)=>x;
        let c = num1(99);
        console.log(c);

        $.ajax({
            url:'https://cache.iminutes.cn/api/soft/category.html',
            type:"GET",
            data:{

            },
            dataType:'json',
            success:(res)=>{
                console.log(res);
                //解构值
                let {data:cates} = res;
                console.log(cates);
            }
        });
        
    </script>
</body>
</html>